<?php
$count = 10;
for ($i=0;$i<2;$i++){
    $pid = pcntl_fork();
    if ($pid==0){
        $count++;
    }else{
        $count = $count*10;
        break;
    }
}

while (1){
    fprintf(STDOUT,"pid=%d,count=%d\n",posix_getpid(),$count);
    sleep(3);
}